package com.ag.lwc.dao;

import java.util.List;

import org.hibernate.Session;

import com.ag.bean.TbEventCleanup;
import com.ag.bean.TbPsContent;
import com.ag.dao.TbPsContentDAO;
//把预案步骤内容的记录查出来,传入环节id
public class MyTbLogPsContentDAO extends TbPsContentDAO {
	public List<TbPsContent> findByPsId(String psId)
	{
		List<TbPsContent> result=null;
		Session session = this.getSessionFactory().openSession();
		result=(List<TbPsContent>) session.createSQLQuery("select * from TB_LOG_PS_CONTENT c left join TB_LOG_PLAN_STEP s on c.PS_ID = s.PS_ID where s.PS_ID =:psId").addEntity(TbPsContent.class).setString("psId", psId).list();
		System.out.println("LogPsContentDAO :   \n\t\t\t步骤内容数目："+result.size());
		session.close();
		return result;
		
	}

}
